package com.qys.livesMall.shop.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qys.livesMall.shop.modal.entity.Advertisement;
import com.qys.livesMall.shop.modal.vo.AdvertisementVO;

import java.util.List;

/**
 * 广告表(H2Advertisement)表数据库访问层
 *
 * @author makejava
 * @since 2023-06-28 09:12:47
 */
public interface AdvertisementMapper extends BaseMapper<Advertisement> {

    /**
     * 保存未读广告
     * @param id
     */
    void saveUnreadAds(Long id);

    /**
     * 获取广告
     * @param userId 用户id
     * @return
     */
    List<AdvertisementVO> getAdvertisement(Long userId);

    /**
     * 删除已读广告
     * @param userId 用户id
     */
    void deleteReadAds(Long userId);
}

